public class StringDemo2 {

    //比较字符串
    public static void main(String[] args) {
        String s1 = "aeF";
        String s2 = "aef";

        //比较字符串的大小
        int ret = s1.compareTo(s2);
        System.out.println(ret);

        //忽略大小写
        ret = s1.compareToIgnoreCase(s2);
        System.out.println(ret);
    }
}
